import request from '@/utils/request'

// 查询发票开具申请单列表
export function listApplication(query) {
  return request({
    url: '/system/application/list',
    method: 'get',
    params: query
  })
}

// 查询发票开具申请单详细
export function getApplication(id) {
  return request({
    url: '/system/application/' + id,
    method: 'get'
  })
}

// 新增发票开具申请单
export function addApplication(data) {
  return request({
    url: '/system/application',
    method: 'post',
    data: data
  })
}

// 修改发票开具申请单
export function updateApplication(data) {
  return request({
    url: '/system/application',
    method: 'put',
    data: data
  })
}

// 删除发票开具申请单
export function delApplication(id) {
  return request({
    url: '/system/application/' + id,
    method: 'delete'
  })
}

// 获取发票审核数据
export function getInvoiceList() {
  return request({
    url: '/system/initiation/invoice',
    method: 'get'
  })
}

// 发票审核通过
export function updateInvoice() {
  return request({
    url: `/system/initiation/invoiceVetting?id=${id}&ok=${ok}`,
    method: 'get'
  })
}



// 吕昊收款发票审核查询
export function getReceivablesList(id) {
  return request({
    url: `/system/application/list1?id=${id}`,
    method: 'get'
  })
}

// 吕凯批量审批应收发票通过
export function updateIds(id) {
  return request({
    url: `/system/application/` + id,
    method: 'get',
  })
}

// 发票批量添加
export function addsApplication(data) {
  return request({
    url: '/system/application/adds',
    method: 'post',
    data: data
  })
}

// 发票批量修改
export function updatesApplication(data) {
  return request({
    url: '/system/application/edits',
    method: 'put',
    data: data
  })
}

// 李坤/流星数据查询
export function getCarbonCopylist() {
  return request({
    url: '/system/initiation/carbonCopylist',
    method: 'get'
  })
}

// 李坤预算审批
export function updateCarbonCopy(id,managementApproval) {
  return request({
    url: `/system/initiation/quotationApproval?id=${id}&managementApproval=${managementApproval}`,
    method: 'get',
  })
}

// 流星预算审批
export function updateCarbonCopyA(id,managementApproval) {
  return request({
    url: `/system/initiation/quotationApprovalA?id=${id}&managementApproval=${managementApproval}`,
    method: 'get',
  })
}

// 李坤采购审核
export function updatemanagementApprovals(id,managementApproval) {
  return request({
    url: `/system/initiation/managementApprovals?id=${id}&managementApproval=${managementApproval}`,
    method: 'get',
  })
}

// 刘星采购审核
export function updatemanagementApprovalas(id,managementApproval) {
  return request({
    url: `/system/initiation/managementApprovalas?id=${id}&managementApproval=${managementApproval}`,
    method: 'get',
  })
}

export function getApplicationList(id) {
  return request({
    url: `/system/application/list2?id=${id}`,
    method: 'get',
  })
}

// lx实付列表
export function getApplicationListLx() {
  return request({
    url: `/system/purchase/liuXin`,
    method: 'get',
  })
}

// lk实付列表
export function getApplicationListLk() {
  return request({
    url: `/system/purchase/liKun`,
    method: 'get',
  })
}

// 负责人实际审核
export function getApplicationListMy() {
  return request({
    url: `/system/purchase/princip`,
    method: 'get',
  })
}

// 吕昊发票审核
export function getApplicationListLh() {
  return request({
    url: `/system/purchase/liuHao`,
    method: 'get',
  })
}

// 吕昊发票页数据
export function getApplicationListLhPage() {
  return request({
    url: `/system/application/listA`,
    method: 'get',
  })
}

// 吕昊发票审批
export function setApplicationListLh(ids) {
  return request({
    url: `/system/application/audit?ids=${ids}`,
    method: 'get',
  })
}




